package com.massteam.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import com.massteam.dao.BaseDAO;
import com.massteam.pojo.ApkType;
import com.massteam.service.ApkTypeService;

/**
 * @author 作者liuchengwei E-mail:liuchengwei98@163.com
 * @version 0.1
 * @since 创建时间：2012-1-6 下午04:34:34
 */
@Repository
public class ApkTypeServiceImpl implements ApkTypeService {
	
	@Autowired
	@Qualifier("baseDao")
	BaseDAO baseDao;

	public void addApkType(ApkType apk) {
		baseDao.saveOrUpdate(apk);
	}

	public void delApkType(String id) {
		baseDao.delById(ApkType.class, id);
	}

	@SuppressWarnings("unchecked")
	public List<ApkType> queryApkType(String hql) {
		return (List<ApkType>) baseDao.query(hql);
	}

	public void updateApkType(String hql) {
		baseDao.update(hql);
	}

	public ApkType findApkTypeById(String id) {
		return (ApkType) baseDao.loadById(ApkType.class, id);
	}

}
